<?php

/* Bridge the theme and plugin parts */

add_action( 'init', 'check_wpwt_theme' );

function check_wpwt_theme() {
	
	if( ! function_exists( 'is_wpwt_theme' ) ) {
		
		add_action( 'admin_notices', 'nag_theme_non_wpwt' );
	
	}
  
}

function nag_theme_non_wpwt() {
	
	echo '<div class="error"><p>' .__( "There is no WPWT-compatible Theme active." , 'wordpress-word-trainer'). '</p></div>';
	
}

/* This functions enables themes to check if WPWT is active using function_exists */
function wpwt_exists() { }

?>